package top.codedance.iotp.common.constent;

public interface Command {
    short NONE = -1; //非法访问
    short HEARTEAT_PING = 0; //心跳包（主动）
    short HEARTEAT_PONG = 1; //心跳包（被动）
    short UPGRADE = 2; //升级检测
    short UPGRADE_RECEIVE = 3; //升级检测返回
    short SHUTDOWN = 4; //关机
    short SHUTDOWN_RECEIVE = 5; //关机返回
    short DOWNLOAD = 6; //下载
    short DOWNLOAD_RECEIVE = 7; //下载返回
    short DOWNLOAD_RECEIVE_ANSWER = 8; //下载返回应答
    short VIEW_CLIENT_VERSION = 9; //查看客户端版本号
    short VIEW_CLIENT_VERSION_RECEIVE = 10; //查看客户端版本号返回
    short REPORT_LOAD = 11; //上报负载信息
    short REPORT_LOAD_RECEIVE = 12; //上报负载信息返回
    short GET_LOAD = 13; //获取负载信息
    short GET_LOAD_RECEIVE = 14; //获取负载信息返回
    short REGISTER = 50; //注册
    short REGISTER_RECEIVE = 51; //注册回复
    short COM_COMMAND = 100; //串口命令
    short COM_COMMAND_RECEIVE = 101; //串口命令返回
    short OPC_COMMAND = 102; //OPC
    short OPC_COMMAND_RECEIVE = 103; //OPC返回
    short MODBUS_COMMAND = 104; //modbus-tcp
    short MODBUS_COMMAND_RECEIVE = 105; //modbus-tcp返回
    short CAN_COMMAND = 106; //can
    short CAN_COMMAND_RECEIVE = 107; //can返回
    short PROFIBUS_COMMAND = 108; //profibus
    short PROFIBUS_COMMAND_RECEIVE = 109; //profibus返回
    short PROFINET_COMMAND = 110; //profinet
    short PROFINET_COMMAND_RECEIVE = 111; //profinet返回
    short DNP_COMMAND = 112; //dnp
    short DNP_COMMAND_RECEIVE = 113; //dnp返回
    short BACNET_COMMAND = 114; //bacnet
    short BACNET_COMMAND_RECEIVE = 115; //bacnet返回
    short IEC_COMMAND = 116; //iec
    short IEC_COMMAND_RECEIVE = 117; //iec返回
    short MTCONNECT_COMMAND = 118; //mtconnect
    short MTCONNECT_COMMAND_RECEIVE = 119; //mtconnect返回
    short MYSQL_COMMAND = 200; //mysql查询命令
    short MYSQL_COMMAND_RECEIVE = 201; //mysql查询命令返回
    short MSSQL_COMMAND = 202; //mssql查询命令
    short MSSQL_COMMAND_RECEIVE = 203; //mssql查询命令
    short ORACLE_COMMAND = 204; //oracle查询命令
    short ORACLE_COMMAND_RECEIVE = 205; //oracle查询命令返回
    short GENERICDB_COMMAND = 206; //genericdb查询命令
    short GENERICDB_COMMAND_RECEIVE = 207; //genericdb查询命令返回
    short HTTP_COMMAND = 300; //http请求
    short HTTP_COMMAND_RECEIVE = 301; //http请求返回
    short PUSH_DATA_COMMAND = 302; //推数据的数据请求
    short PUSH_DATA_COMMAND_RECEIVE = 303; //推数据的数据请求返回
    short UDP_COMMAND = 304; //udp数据请求
    short UDP_COMMAND_RECEIVE = 305; //udp数据请求返回
    short ASYNC_PUSH_DATA_COMMAND = 400; //异步推数据的数据请求
    short ASYNC_PUSH_DATA_COMMAND_RECEIVE = 401; //异步推数据的数据请求返回
    short ASYNC_OPC_COMMAND = 402; //异步OPC
    short ASYNC_OPC_COMMAND_RECEIVE = 403; //异步OPC返回
    short ASYNC_COM_COMMAND = 404; //COM
    short ASYNC_COM_COMMAND_RECEIVE = 405; //异步COM返回
    short ASYNC_SYSTEM_COMMAND = 406; //异步系统命令
    short ASYNC_SYSTEM_COMMAND_RECEIVE = 407; //异步系统命令返回
    short ASYNC_MQTT_COMMAND = 408; //异步mqtt发送命令
    short ASYNC_MQTT_COMMAND_RECEIVE = 409; //异步mqtt回复命令
    short ASYNC_CSTATUS_COMMAND = 410; //异步客户端状态发送命令
    short ASYNC_CSTATUS_COMMAND_RECEIVE = 411; //异步客户端状态回复命令
    short ASYNC_UDP_COMMAND = 412; //异步udp数据请求
    short ASYNC_UDP_COMMAND_RECEIVE = 413; //异步udp数据请求返回
    short ASYNC_BACNET_COMMAND = 414; //异步BACNet请求
    short ASYNC_BACNET_COMMAND_RECEIVE = 415; //异步BACNet请求返回
    short CLIENT_PLUGINS_PARAMS_SET = 500; //客户端各插件参数设置
    short CLIENT_PLUGINS_PARAMS_SET_RECEIVE = 501; //客户端各插件参数设置返回
    short CLIENT_PLUGINS_PARAMS_GET = 502; //客户端各插件参数获取
    short CLIENT_PLUGINS_PARAMS_GET_RECEIVE = 503; //客户端各插件参数获取返回
    short CLIENT_BOOT_PARAMS_GET = 504; //客户端服务启动参数获取
    short CLIENT_BOOT_PARAMS_GET_RECEIVE = 505; //客户端服务启动参数获取返回
    short CLIENT_BOOT_PARAMS_SET = 506; //客户端服务启动参数设置
    short CLIENT_BOOT_PARAMS_SET_RECEIVE = 507; //客户端服务启动参数设置返回
    short SYSTEM_COMMAND = 1000; //系统命令
    short SYSTEM_COMMAND_RECEIVE = 1001; //系统命令返回
    short CONSOLE_MANAGE_COMMAND = 2000; //控制台管理命令
    short CONSOLE_MANAGE_COMMAND_RECEIVE = 2001; //控制台管理命令返回

    //通讯不加密码的命令白名单
    Short[] NO_ENCRYPT_CMDS = {
            HEARTEAT_PING,
            HEARTEAT_PONG,
            UPGRADE,
            UPGRADE_RECEIVE,
            DOWNLOAD,
            DOWNLOAD_RECEIVE,
            REGISTER,
            REGISTER_RECEIVE,
            REPORT_LOAD,
            REPORT_LOAD_RECEIVE,
            GET_LOAD,
            GET_LOAD_RECEIVE
    };
}